#ifndef INPUT_H_
#define INPUT_H_

#include <SDL/SDL.h>

namespace JDL
{
  class Input
  {
  public:
    Input(SDL_Event *event);
    ~Input();
    SDLKey	GetKey() const;
    Uint16	GetMouseX() const;
    Uint16	GetMouseY() const;
    Uint16	GetMouseXRel() const;
    Uint16	GetMouseYRel() const;
    SDL_Rect	GetMousePos() const;
    SDL_Rect	GetMousePosRel() const;
    bool	IsKeyDown(SDLKey key) const;
    bool	IsMouseDown(Uint8 button) const;
    void	Update();

  private:
    bool	_key[SDLK_LAST];
    bool	_key_down;
    int		_mousex;
    int		_mousey;
    int		_mousexrel;
    int		_mouseyrel;
    char	_mousebuttons[8];
    SDL_Event	*_event;

    void	Refresh();
  };
}

#endif
